package com.beautify.exception;

import com.beautify.entity.pojo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
@Slf4j
public class GlobalExceptionHandler {

    @ExceptionHandler(Exception.class)
    public Result handleGlobalException(Exception e) {
      log.info("异常：{}",e.getMessage());
        return Result.error();
    }

}
